package com.cloud.spring.environment;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.StandardEnvironment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class EnvironmentConfigController {
    @Autowired
    private StandardEnvironment standardEnvironment;

    @GetMapping("/getEnvironment")
    public String getConfigService() {
        String mayiktName = standardEnvironment.getProperty("mayikt.name");
        return mayiktName;
    }
}
